<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular.min.js"></script>
		<script type="text/javascript" src="../js/angular-route.min.js" ></script>
	</head>
	<body ng-app="myapp">
		<div>
			<h1>HEAD</h1>
			<li><a href="#/1">啊</a></li>
			<li><a href="#/2">哦</a></li>
			<li><a href="#/3">哟</a></li>
		</div>
		<!--
        	ng-view 显示路由调用的页面
        -->
		<div ng-view>
		</div>
		<div><h1>FOOT</h1></div>
		<script type="text/javascript">
			
			var myapp = angular.module("myapp",["ngRoute"]);
			myapp.config(["$routeProvider",function($routeProvider){
				//设置路由对应界面
				$routeProvider.when("/1",{
					templateUrl:'3_1.html'
				}).
				when("/2",{
					templateUrl:'3_2.html'
				}).
				when("/3",{
					templateUrl:'3_3.html'
				}).otherwise({
					redirectTo:"/2"
				});
			}]);
		</script>
	</body>
</html>
